﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Capitalizer
{
    public static class Extension
    {
        public static string ToTitleCase(this string text)
        {
            TextInfo textInfo = new CultureInfo("en-US").TextInfo;
            string titleCased = textInfo.ToTitleCase(text);
            return titleCased;
        }
    }

    class Capitalizer
    {
        static void Main(string[] args)
        {
            string textToCapitalize = "this is tHe teXt to capITaliZe!";
            string text = textToCapitalize.ToTitleCase();
            Console.WriteLine(text);
        }
    }
}
